package generator.domain;

import java.util.Date;

/**
 * 
 * @TableName user_badges
 */
public class UserBadges {
    /**
     * 
     */
    private Integer id;

    /**
     * 
     */
    private Integer userId;

    /**
     * 
     */
    private Integer badgeId;

    /**
     * 
     */
    private Date awardedAt;

    /**
     * 
     */
    private Object meta;

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 
     */
    public Integer getBadgeId() {
        return badgeId;
    }

    /**
     * 
     */
    public void setBadgeId(Integer badgeId) {
        this.badgeId = badgeId;
    }

    /**
     * 
     */
    public Date getAwardedAt() {
        return awardedAt;
    }

    /**
     * 
     */
    public void setAwardedAt(Date awardedAt) {
        this.awardedAt = awardedAt;
    }

    /**
     * 
     */
    public Object getMeta() {
        return meta;
    }

    /**
     * 
     */
    public void setMeta(Object meta) {
        this.meta = meta;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserBadges other = (UserBadges) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getBadgeId() == null ? other.getBadgeId() == null : this.getBadgeId().equals(other.getBadgeId()))
            && (this.getAwardedAt() == null ? other.getAwardedAt() == null : this.getAwardedAt().equals(other.getAwardedAt()))
            && (this.getMeta() == null ? other.getMeta() == null : this.getMeta().equals(other.getMeta()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getBadgeId() == null) ? 0 : getBadgeId().hashCode());
        result = prime * result + ((getAwardedAt() == null) ? 0 : getAwardedAt().hashCode());
        result = prime * result + ((getMeta() == null) ? 0 : getMeta().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", badgeId=").append(badgeId);
        sb.append(", awardedAt=").append(awardedAt);
        sb.append(", meta=").append(meta);
        sb.append("]");
        return sb.toString();
    }
}